//
//  TImageVedioController.m
//  ProjectDemo
//
//  Created by IOS3 on 2019/1/11.
//  Copyright © 2019 IOS3. All rights reserved.
//

#import "TImageVedioController.h"
#import <YBImageBrowser.h>
#import <SJVideoPlayer.h>
#import "SimpleVedioController.h"



@interface TImageVedioController ()

@end

@implementation TImageVedioController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
}


- (IBAction)showAImage:(id)sender {
//    NSString *picStr = @"http://www.ivsky.com/download_pic.html?picurl=/img/tupian/pic/201709/01/tongxun_jifang-002.jpg";
    NSString *picStr = @"http://c.hiphotos.baidu.com/baike/pic/item/d1a20cf431adcbefd4018f2ea1af2edda3cc9fe5.jpg";
    YBImageBrowseCellData *data = [[YBImageBrowseCellData alloc] init];
    data.url = [NSURL URLWithString:picStr];
    data.sourceObject = self.view;
    
    
    
    
    
    YBImageBrowser *browser = [[YBImageBrowser alloc] init];
    browser.dataSourceArray = @[data];
    browser.currentIndex = 0;
    browser.defaultToolBar.hidden = true;
    
    [browser show];
    
}

- (IBAction)showAVedio:(id)sender {
    
//    NSString *vedioStr = @"https://www.apple.com/105/media/us/iphone-x/2017/01df5b43-28e4-4848-bf20-490c34a926a7/films/feature/iphone-x-feature-tpl-cc-us-20170912_1280x720h.mp4";
    
    NSString *vedioStr = @"http://file.wm319.com/public/video/e673aabbf79d42898dd7341f8f8c1b99.mp4";
   
    SimpleVedioController *vc = SimpleVedioController.new;
    vc.urlString = vedioStr;
    [self presentViewController:vc animated:YES completion:nil];
    
}


@end
